﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace EFTest
{
    public partial class About : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            TestMigration();
        }

        public void TestMigration()
        {
            using(var db = new  BlogContext())
            {
                db.Blogs.Add(new Blog() {  Name = "blog1"});
                db.SaveChanges();
                foreach (var item in db.Blogs)
                {
                    Response.Write(item.Name + "--");
                }
            }
        }


    }
}
